//
//  ProjectBtn.m
//  DSSH
//
//  Created by lcy on 16/4/6.
//  Copyright © 2016年 lcy. All rights reserved.
//

#import "ProjectBtn.h"

@implementation ProjectBtn
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        _image = [[UIImageView alloc]init];
//        _image.frame = CGRectMake(0, 0, 20*WIDTH_SCALE, 16);
        [self addSubview:_image];
        
        _LabelTitle = [[UILabel alloc]init];
//        _LabelTitle.frame = CGRectMake(0, 16, 20*WIDTH_SCALE, 16);
//        _LabelTitle.font = FONT(8);
        _LabelTitle.textColor = [UIColor whiteColor];
        _LabelTitle.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_LabelTitle];
        
        [_image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).with.offset(0);
            make.right.equalTo(self).with.offset(0);
            make.bottom.equalTo(self.mas_bottom).with.offset(-16);
            make.top.equalTo(self.mas_top).with.offset(0);
        }];
        [_LabelTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).with.offset(0);
            make.right.equalTo(self).with.offset(0);
            make.bottom.equalTo(self.mas_bottom).with.offset(0);
            make.height.mas_equalTo(16);
        }];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
